/*
 * VisitBathroom.java
 *
 * Created on March 27, 2007, 4:49 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package ai9hells.pgaibe.chapter2.westworldwithmessaging;

import ai9hells.pgaibe.common.fsm.State;
import ai9hells.pgaibe.common.messaging.Telegram;

/**
 *
 * @author andre.bandarra
 */
public class VisitBathroom extends State<MinersWife>{
    public static final VisitBathroom INSTANCE = new VisitBathroom();
    /** Creates a new instance of VisitBathroom */
    public VisitBathroom() {
    }

    public void enter(MinersWife entity) {
        System.out.println(EntityNames.getNameOfEntity(entity.getId())+": Walkin' to the can. Need to powda mah pretty li'lle nose");                        
    }

    public void execute(MinersWife entity) {
        System.out.println(EntityNames.getNameOfEntity(entity.getId())+": Ahhhhhh! Sweet relief!");                        
        entity.getStateMachine().revertToPreviousState();
    }

    public void exit(MinersWife entity) {
        System.out.println(EntityNames.getNameOfEntity(entity.getId())+": Leavin' the Jon");                
    }

    public boolean onMessage(MinersWife entity, Telegram t) {
        return false;
    }
    
}
